package com.example.feigntest.feignclient;

import com.example.feigntest.controller.FeignRequestInterceptorTestController;
import com.example.feigntest.feignclient.config.RequestInterceptorConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * 描述：用来发起 http 请求测试 RequestInterceptor
 * 指定要用的 configuration
 *
 * @author YangQun by 2020/10/17
 */
@FeignClient(name = "RequestInterceptorTest",
        configuration = RequestInterceptorConfig.class,
        url = "http://localhost:${server.port}")
public interface RequestInterceptorTestClient {

    /**
     * 发起调用
     */
    @PostMapping(FeignRequestInterceptorTestController.URI)
    public void test(@RequestBody Map<String, Object> m);


}
